package com.iaiai.cobra.repository.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.iaiai.cobra.repository.bean.Dept;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created with DeptMapper.
 * Package: com.iaiai.cobra.repository.mapper
 * Author: iaiai
 * Create Time: 2024/6/28 20:18
 * QQ: 176291935
 * Email: 176291935@qq.com
 * Description:
 */
@Mapper
@Repository
public interface DeptMapper extends BaseMapper<Dept> {

    //分页查询
    Page<Dept> queryPage(Page page, @Param("search") String search);

    //查询排序最大的
    Dept queryMax();

    //查询启用所有的
    List<Dept> queryEnableAll();

    //查询用户部门
    List<Dept> queryByUser(@Param("userId") Long userId);

}
